import request from '@/utils/requst'
import { post,postFormDataAction,download } from "./manage";

const login = (params) => post('/ssnydsq/login/sms/verify',params)

const getCode = (params)=>
  request.post('/ssnydsq/login/send/sms?telephone='+params)

const getProjectFileList = (params)=>
  postFormDataAction('/ssnydsq/hw/obs/getFiles/byType/id',params)

const getProjectListData = (params)=>
  request.post('/ssnydsq/applies/project/page/query/PC',params)

const getProjectInfoDetail = (params)=> 
  request.get('/ssnydsq/applies/project/id/PC?id='+params)

const deleteFileForId = (params)=>
  postFormDataAction('/ssnydsq/hw/obs/deleteFile/'+params)

const saveProjectData = (params)=> 
  request.post('/ssnydsq/applies/fileZip/push/PC',params)

const downloadFile = (params)=> 
  postFormDataAction('/ssnydsq/hw/obs/getAnnexInfo/byAnnexId?id='+params)

const editProject = (params)=>
  request.post('/ssnydsq/applies/project/file/commit',params)

const getDictData = (params)=>
  request.get('/ssnydsq/dict/get/dictInfo/type?type='+params)
//踏勘审核
const submitTk = (params)=>
    request.post('/ssnydsq/applies/project/tk/audit',params)

const getYkbUserInfo = (params)=>
    request.post(process.env.VUE_APP_YKBUSER_URL,params)
export default{
  login,
  getCode,
  getProjectListData,
  getProjectFileList,
  getProjectInfoDetail,
  deleteFileForId,
  saveProjectData,
  downloadFile,
  editProject,
  getDictData,
  submitTk,
  getYkbUserInfo,
}